<?php
$this->beginWidget('bootstrap.widgets.TbBox', array(
	'title' => '项目列表',
	'headerIcon' => 'icon-th-large',
	)
);
$this->widget('bootstrap.widgets.TbGridView', array(
	'type' => 'striped bordered condensed',
	'dataProvider' => $gridDataProvider,
	'template' => "{items}",
	'rowCssClassExpression' => 'isset($data["error"])?"error":""',
	'columns' => array(
		array(
			'labelExpression' => '$data["name"]',
			'urlExpression' => 'isset($data["error"])?"javascript:;":array("project/schema","project"=>$data["name"])',
			'header' => '项目名',
			'class' => 'zii.widgets.grid.CLinkColumn',
			'htmlOptions' => array('nowrap' => 'nowrap'),
		),
		array(
			'name' => 'server',
			'header' => '服务器',			
			'value' => 'isset($data["error"])?$data["error"]:$data["server"]',
		),
		array(
			'name' => 'charset',
			'header' => '编码',
			'htmlOptions' => array('nowrap' => 'nowrap'),
		),
		array(
			'name' => 'count',
			'header' => '索引量',
			'value' => 'number_format($data["count"])',
			'htmlOptions' => array('nowrap' => 'nowrap'),
		),
		array(
			'name' => 'created',
			'header' => '创建时间',
			'value' => 'date("Y-m-d",$data["created"])',
			'htmlOptions' => array('nowrap' => 'nowrap'),
		),
	),
));
$this->endWidget();
$this->renderPartial('//project/_quick_create');
